package com.palfund.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

public class OwnStaticReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        String info = intent.getStringExtra("info");
        Toast.makeText(context, "OwnStatic   " + info, Toast.LENGTH_LONG).show();
        Log.i("OwnStaticReceiver", "---onReceive()--->" + info);
        if ("order".equals(info)) {
            Bundle resultExtras = getResultExtras(true);
            String resultInfo = resultExtras.getString("info");
            Toast.makeText(context, "OwnStatic   " + resultInfo, Toast.LENGTH_LONG).show();
            String extra = resultExtras.getString("extra");
            Toast.makeText(context, "OwnStatic   " + extra, Toast.LENGTH_SHORT).show();
        }
    }
}
